package util;

public class RedisClusterFactory {

	public static RedisClusterFactory instance = new RedisClusterFactory();

	private RedisCluster folRedisCluster;
	private RedisCluster statusRedisCluster;
	private RedisCluster metaDataRedisCluster;

	private RedisClusterFactory() {
		statusRedisCluster = new RedisCluster(Configuration.instance()
				.getStatusHosts(), Configuration.instance().getStatusPort());

		folRedisCluster = new RedisCluster(Configuration.instance()
				.getFollowShipHosts(), Configuration.instance()
				.getFollowShipPort());

		metaDataRedisCluster = new RedisCluster(Configuration.instance()
				.getMetaHosts(), Configuration.instance().getMetaPort());
	}

	public RedisCluster getFolRedisCluster() {
		return folRedisCluster;
	}

	public RedisCluster getStatusRedisCluster() {
		return statusRedisCluster;
	}

	public RedisCluster getMetaDataRedisCluster() {
		return metaDataRedisCluster;
	}
}
